///PHILOTES Source Code.  (C)2012 PhiloLabs
#pragma once

#ifndef __RenderWindow_H__
#define __RenderWindow_H__

#include "OgrePrerequisites.h"

#include "OgreRenderTarget.h"

namespace Ogre
{
	
	
	
    class _OgreExport RenderWindow : public RenderTarget
    {

    public:
        
        RenderWindow();

        
		virtual void create(const String& name, unsigned int width, unsigned int height,
	            bool fullScreen, const NameValuePairList *miscParams) = 0;

		
		virtual void setFullscreen(bool fullScreen, unsigned int width, unsigned int height)
                { (void)fullScreen; (void)width; (void)height; }
        
        
        virtual void destroy(void) = 0;

        
        virtual void resize(unsigned int width, unsigned int height) = 0;

        
        virtual void windowMovedOrResized() {}

        
        virtual void reposition(int left, int top) = 0;

        
        virtual bool isVisible(void) const { return true; }

        
        virtual void setVisible(bool visible)
        { (void)visible; }

		
		virtual bool isHidden(void) const { return false; }

		
		virtual void setHidden(bool hidden)
		{ (void)hidden; }

		
		virtual void setVSyncEnabled(bool vsync)
		{ (void)vsync; }

		
		virtual bool isVSyncEnabled() const { return false; }

		
		virtual void setVSyncInterval(unsigned int interval)
		{ (void)interval; }

		
		virtual unsigned int getVSyncInterval() const { return 1; }
	    

        
        virtual bool isActive(void) const { return mActive && isVisible(); }

        
        virtual bool isClosed(void) const = 0;
        
        
        virtual bool isPrimary(void) const;

        
        virtual bool isFullScreen(void) const;

        
        virtual void getMetrics(unsigned int& width, unsigned int& height, unsigned int& colourDepth, 
			int& left, int& top);

		/// Override since windows don't usually have alpha
		PixelFormat suggestPixelFormat() const { return PF_BYTE_RGB; }

        
        bool isDeactivatedOnFocusChange() const;

        
        void setDeactivateOnFocusChange(bool deactivate);

    protected:
        bool mIsFullScreen;
        bool mIsPrimary;
        bool mAutoDeactivatedOnFocusChange;
        int mLeft;
        int mTop;
        
        
        void _setPrimary() { mIsPrimary = true; }
        
        friend class Root;
    };
	
	

} // Namespace
#endif
